﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using Microsoft.Win32;

namespace BreukADO
{
    public partial class VoorlopigeSchermkiezer : Form
    {
        public VoorlopigeSchermkiezer()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form1 form = new Form1();
            form.Show();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form2 form = new Form2();
            form.Show();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Form form = new BeheerOpdrachten();
            form.Show();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Form form = new MaakNieuweOpdracht(new BeheerOpdrachten());
            form.Show();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            Form form = new MaakOpdracht();
            form.Show();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            Form form = new ToonResultatenOpdracht();
            form.Show();
        }
        //zinloos
        private void button7_Click(object sender, EventArgs e)
        {
            string defaultBrowserPath = ZoekBrowser();
            try
            {
                // launch default browser
                Process.Start(defaultBrowserPath, "http://www.youtube.com/watch?v=1MLry6Cn_D4&NR=1#movie_player");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private static string ZoekBrowser()
        {

            string key = @"htmlfile\shell\open\command";

            RegistryKey registryKey =

            Registry.ClassesRoot.OpenSubKey(key, false);

            // get default browser path

            return ((string)registryKey.GetValue(null, null)).Split('"')[1];

        }
        //einde zinloos
    }
}
